<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<style type="text/css">
body{background:url("4.jpg") no-repeat;}
</style>
<title>login</title>
</head>
<script>
function check(){
	if(login.userName.value==''){
		alert("用户名不能为空！");
		login.userName.focus();
		return false;
	}
	if(login.pwd.value==''){
		alert("密码不能为空！");
		login.pwd.focus();
		return false;
	}
	else
		login.submit();
}
function jump(){
	document.location ="http://localhost:8080/TextJSP/dao/register.html";//跳转注册页面 

}
</script>
<body>
<center>
 <form action="login.jsp" method="post" name="login">
 <br/> <br/>
     <h1>欢迎登录！</h1>
     <hr>
     <table border="1" bgcolor="lightpink">
     <tr><td colspan="2">登录</tr>
     <tr><td>用户名</td>   <td><input type="text" name="userName"></td></tr>
     <tr><td>密码</td>    <td><input type="password" name="pwd"></td></tr>
     </table>
     <br>
     <table>
     <tr><td><input type="button" name="ok" value="登录" onclick="check()"></td>    
     <td><input type="button" name="reg" value="注册" onclick="jump()"></td></tr>
     </table> 
     </form>
     </center>
</body>
</html>
